<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Electron 页面调用</title>
</head>
<body>

  <a href="/">刷新13333</a>

  <h1>Hello Electron!</h1>
  <button onclick="loadVersion()">获取版本号</button>

  <button onclick="openLoadingWindow()">打开打印窗口</button>
  <p id="version">...</p>

  <script>

    async function loadVersion() {
      const version = await window.myAPI.getAppVersion();
      document.getElementById('version').innerText = 'App Version: ' + version;
    }

    async function openLoadingWindow() {
      const result = await window.myAPI.openLoadingWindow();
      console.log(result);
    }
  </script>
</body>
</html>